/**
 *  @file
 *  @brief   8节点六面体非协调形函数
 *  @author  xiashijun
 *  @date    2025.03.10
 *  @version v1.0
 *  @par Copyright(c):  ShenGong  Simulation corporation
 */

#pragma once
#ifndef NDEBUG
    #define NDEBUG
#endif
#include <assert.h>
#include <vector>

#include "Utility/Algebra/Matrix.h"
#include "DataStructure/Common/SGNamespace.h"
#include "DataStructure/Input/Solver/IntegPoint.h"
#include "../Common/IntegrationExport.h"

SG_NAMESPACE_OPEN
namespace FEMSolver
{
namespace Element
{

/** @brief 八节点六面体非协形函数。
*/
class Integration_DECLSPEC Hex8NodeIncomShpFunc
{
public:
    Hex8NodeIncomShpFunc ();
    void  Compute (const SG::DataStructure::FEM::IntegPointArray& integs);
    const SG::Algebra::Matrixd& GetShapeFunctionDerivate (int index) const;

 private:
    std::vector<SG::Algebra::Matrixd> DNDxiSet;
};

inline const SG::Algebra::Matrixd& Hex8NodeIncomShpFunc::GetShapeFunctionDerivate (int index) const
{
    assert (index < DNDxiSet.size ());
    return DNDxiSet[index];
}

}; // namespace Element
}; // namespace FEMSolver
SG_NAMESPACE_CLOSE